package com.woniuxy.carlife.carlifeuserweb.service;

import com.woniuxy.carlife.carlifecommonsweb.exception.CarlifeGlobalException;
import com.woniuxy.carlife.carlifeuserweb.entity.Shoppingcart;
import com.baomidou.mybatisplus.extension.service.IService;
import io.swagger.models.auth.In;

import java.util.List;

/**
 * @author zjq
 * @ClassName:ShoppingcartService
 * @Description:用户购物车
 * @date 2021/4/6 20:02
 **/

public interface ShoppingcartService extends IService<Shoppingcart> {


    /*
     * 功能描述〈用户查询购物车〉
     * @author:zjq
     * @param:
     * @return:
     * @Date 2021/4/12 11:52
     * @throws
     */

    public List<Shoppingcart> findShoppingcartByUserId(Integer userId);

    /*
     * 功能描述〈用户新增购物车〉
     * @author:zjq
     * @param:
     * @return:
     * @Date 2021/4/13 4:53
     * @throws
     */

    public boolean addShoppingcartByUserId(Shoppingcart shoppingcart);

    /*
     * 功能描述〈用户删除购物车〉
     * @author:zjq
     * @param:
     * @return:
     * @Date 2021/4/13 4:54
     * @throws
     */

    public boolean deleteShoppingcartByShoppingcartId(Integer shoppingcartId,Integer userId);


    /*
     * 功能描述〈统计用户购物车数量〉
     * @author:zjq
     * @param:
     * @return:
     * @Date 2021/4/15 15:53
     * @throws
     */
    public Integer shoppingcartTotalByUserId(Integer userId);

}
